package cn.dbqn.controller;

import cn.dbqn.entity.Clientinfo;
import cn.dbqn.entity.Empinfo;
import cn.dbqn.service.EmpinfoService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class EmpinfoController {
    @Resource
    EmpinfoService empinfoService;

    @RequestMapping("/listyg")
    public String list(Model model){
        List<Empinfo> list=empinfoService.findALlYg();
        model.addAttribute("list",list);
        return "lyear_ui_grid";
    }

    //查询单个供商信息
    @ResponseBody
    @RequestMapping("ygxx")
    public Object ygxx(@RequestParam("eno")Integer eno){
        Empinfo ygxx=empinfoService.ygxx(eno);
        return ygxx;
    }
}
